From: Timm Bäder Date: Wed, 3 Jan 2018 12:51:03 +0000 (+0100) Subject: scrolledwindow: Fix code sample compilation X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~38^2~82 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=af1d5362abbbb0dd40ef25ef34ee2b02f1b67486;p=gtk%2B3.0.git scrolledwindow: Fix code sample compilation --- diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index 25e5d1cd3a..ac06f1cc10 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -70,8 +70,13 @@ * * If gtk_container_add() has added a #GtkViewport for you, you can remove * both your added child widget from the #GtkViewport, and the #GtkViewport - * from the GtkScrolledWindow, with either of these calls: + * from the GtkScrolledWindow, like this: * |[ + * GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL); + * GtkWidget *child_widget = gtk_button_new (); + * + * // GtkButton is not a GtkScrollable, so GtkScrolledWindow will automatically + * // add a GtkViewport. * gtk_container_remove (GTK_CONTAINER (scrolled_window), * child_widget); * // or